\hypertarget{structnih_1_1_s_h__basis}{
\section{nih\-:\-:\-S\-H\-\_\-basis$<$ \-L $>$ \-Struct \-Template \-Reference}
\label{structnih_1_1_s_h__basis}\index{nih\-::\-S\-H\-\_\-basis$<$ L $>$@{nih\-::\-S\-H\-\_\-basis$<$ L $>$}}
}


{\ttfamily \#include $<$sh.\-h$>$}

\subsection*{\-Static \-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Vector3 $>$ }\\static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float \hyperlink{structnih_1_1_s_h__basis_a015b1ccbbb8b30cea48b6086e6888958}{eval} (const int32 i, const \-Vector3 \&d)
\item 
static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void \hyperlink{structnih_1_1_s_h__basis_a2d59e8f416f38c7aff714f45464ceb51}{clamped\-\_\-cosine} (const \hyperlink{structnih_1_1_vector}{\-Vector3f} \&normal, const float w, float $\ast$coeffs)
\item 
static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void \hyperlink{structnih_1_1_s_h__basis_a26b7088e841914d02b4ad3f8882c0f99}{constant} (float k, float $\ast$coeffs)
\item 
static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float \hyperlink{structnih_1_1_s_h__basis_a38267a663734885b3c85c3db0c20622d}{integral} (const float $\ast$coeffs)
\item 
{\footnotesize template$<$typename Vector\-\_\-type $>$ }\\static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float \hyperlink{structnih_1_1_s_h__basis_a55821f44183433a4d9571bcfe21464f5}{integral} (const \-Vector\-\_\-type \&coeffs)
\item 
static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void \hyperlink{structnih_1_1_s_h__basis_ac3977f6d1133e5cbbfc72b5478b9daae}{solve} (float $\ast$coeffs)
\end{DoxyCompactItemize}
\subsection*{\-Static \-Public \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{structnih_1_1_s_h__basis_af42f0d137677a2e88dd6d7f4d74d01bc}{
static const int32 {\bfseries \-O\-R\-D\-E\-R} = \-L}
\label{structnih_1_1_s_h__basis_af42f0d137677a2e88dd6d7f4d74d01bc}

\item 
\hypertarget{structnih_1_1_s_h__basis_a36537f2e9987f6c7b68556b6f1c717cc}{
static const int32 {\bfseries \-C\-O\-E\-F\-F\-S} = \-L$\ast$\-L}
\label{structnih_1_1_s_h__basis_a36537f2e9987f6c7b68556b6f1c717cc}

\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\subsubsection*{template$<$int32 \-L$>$struct nih\-::\-S\-H\-\_\-basis$<$ L $>$}

\-Spherical harmonics basis functions of order \-L 

\subsection{\-Member \-Function \-Documentation}
\hypertarget{structnih_1_1_s_h__basis_a2d59e8f416f38c7aff714f45464ceb51}{
\index{nih\-::\-S\-H\-\_\-basis@{nih\-::\-S\-H\-\_\-basis}!clamped\-\_\-cosine@{clamped\-\_\-cosine}}
\index{clamped\-\_\-cosine@{clamped\-\_\-cosine}!nih::SH_basis@{nih\-::\-S\-H\-\_\-basis}}
\subsubsection[{clamped\-\_\-cosine}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 \-L$>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void {\bf nih\-::\-S\-H\-\_\-basis}$<$ \-L $>$\-::clamped\-\_\-cosine (
\begin{DoxyParamCaption}
\item[{const {\bf \-Vector3f} \&}]{normal, }
\item[{const float}]{w, }
\item[{float $\ast$}]{coeffs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{structnih_1_1_s_h__basis_a2d59e8f416f38c7aff714f45464ceb51}
add a weighted basis expansion of a clamped cosine lobe to a given set of coefficients


\begin{DoxyParams}{\-Parameters}
{\em normal} & input normal \\
\hline
{\em w} & scalar weight \\
\hline
{\em coeffs} & input/output coefficients \\
\hline
\end{DoxyParams}
\hypertarget{structnih_1_1_s_h__basis_a26b7088e841914d02b4ad3f8882c0f99}{
\index{nih\-::\-S\-H\-\_\-basis@{nih\-::\-S\-H\-\_\-basis}!constant@{constant}}
\index{constant@{constant}!nih::SH_basis@{nih\-::\-S\-H\-\_\-basis}}
\subsubsection[{constant}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 \-L$>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void {\bf nih\-::\-S\-H\-\_\-basis}$<$ \-L $>$\-::constant (
\begin{DoxyParamCaption}
\item[{float}]{k, }
\item[{float $\ast$}]{coeffs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{structnih_1_1_s_h__basis_a26b7088e841914d02b4ad3f8882c0f99}
return the basis expansion of a constant


\begin{DoxyParams}{\-Parameters}
{\em k} & input constant \\
\hline
{\em coeffs} & output coefficients \\
\hline
\end{DoxyParams}
\hypertarget{structnih_1_1_s_h__basis_a015b1ccbbb8b30cea48b6086e6888958}{
\index{nih\-::\-S\-H\-\_\-basis@{nih\-::\-S\-H\-\_\-basis}!eval@{eval}}
\index{eval@{eval}!nih::SH_basis@{nih\-::\-S\-H\-\_\-basis}}
\subsubsection[{eval}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 \-L$>$ template$<$typename Vector3 $>$ \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float {\bf nih\-::\-S\-H\-\_\-basis}$<$ \-L $>$\-::eval (
\begin{DoxyParamCaption}
\item[{const int32}]{i, }
\item[{const \-Vector3 \&}]{d}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{structnih_1_1_s_h__basis_a015b1ccbbb8b30cea48b6086e6888958}
evaluate the i-\/th coefficient at a given point


\begin{DoxyParams}{\-Parameters}
{\em i} & coefficient index \\
\hline
{\em d} & direction vector \\
\hline
\end{DoxyParams}
\hypertarget{structnih_1_1_s_h__basis_a38267a663734885b3c85c3db0c20622d}{
\index{nih\-::\-S\-H\-\_\-basis@{nih\-::\-S\-H\-\_\-basis}!integral@{integral}}
\index{integral@{integral}!nih::SH_basis@{nih\-::\-S\-H\-\_\-basis}}
\subsubsection[{integral}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 \-L$>$ static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float {\bf nih\-::\-S\-H\-\_\-basis}$<$ \-L $>$\-::integral (
\begin{DoxyParamCaption}
\item[{const float $\ast$}]{coeffs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{structnih_1_1_s_h__basis_a38267a663734885b3c85c3db0c20622d}
return the integral of a spherical hamonics function \hypertarget{structnih_1_1_s_h__basis_a55821f44183433a4d9571bcfe21464f5}{
\index{nih\-::\-S\-H\-\_\-basis@{nih\-::\-S\-H\-\_\-basis}!integral@{integral}}
\index{integral@{integral}!nih::SH_basis@{nih\-::\-S\-H\-\_\-basis}}
\subsubsection[{integral}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 \-L$>$ template$<$typename Vector\-\_\-type $>$ static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E float {\bf nih\-::\-S\-H\-\_\-basis}$<$ \-L $>$\-::integral (
\begin{DoxyParamCaption}
\item[{const \-Vector\-\_\-type \&}]{coeffs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{structnih_1_1_s_h__basis_a55821f44183433a4d9571bcfe21464f5}
return the integral of a spherical hamonics function \hypertarget{structnih_1_1_s_h__basis_ac3977f6d1133e5cbbfc72b5478b9daae}{
\index{nih\-::\-S\-H\-\_\-basis@{nih\-::\-S\-H\-\_\-basis}!solve@{solve}}
\index{solve@{solve}!nih::SH_basis@{nih\-::\-S\-H\-\_\-basis}}
\subsubsection[{solve}]{\setlength{\rightskip}{0pt plus 5cm}template$<$int32 \-L$>$ static \-N\-I\-H\-\_\-\-H\-O\-S\-T\-\_\-\-D\-E\-V\-I\-C\-E void {\bf nih\-::\-S\-H\-\_\-basis}$<$ \-L $>$\-::solve (
\begin{DoxyParamCaption}
\item[{float $\ast$}]{coeffs}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, static\mbox{]}}}}
\label{structnih_1_1_s_h__basis_ac3977f6d1133e5cbbfc72b5478b9daae}
solve the linear least squares projection for a set of coefficients


\begin{DoxyParams}{\-Parameters}
{\em coeffs} & input projection coefficients \\
\hline
\end{DoxyParams}


\-The documentation for this struct was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
spherical/\hyperlink{sh_8h}{sh.\-h}\item 
spherical/sh\-\_\-inline.\-h\end{DoxyCompactItemize}
